<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>设置</title>

    <link rel="stylesheet" type="text/css" href="../../css/api.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/yzl.css"/>

</head>
<body>
    <div id="blank" class="header" v-cloak>
        <div v-back.tapmode class="back"></div>
        <span class="title">设置</span>
    </div>
    <div id="app" class="main-container" v-cloak>
        <div class="row-container">
            <!-- <a v-open-win vurl="userinfo" class="row" v-row-active.tapmode>
                <span>个人资料</span>
                <img class="row-arrow" v-src="'../../image/arrow_right_grey.png'">
            </a> -->
            <a v-open-win vurl="updpwd" class="row" v-row-active.tapmode>
                <span>密码设置</span>
                <img class="row-arrow" v-src="'../../image/arrow_right_grey.png'">
            </a>
            <a class="row" v-open-win vurl="authorize" v-row-active.tapmode>
                <span>第三方授权</span>
                <img class="row-arrow" v-src="'../../image/arrow_right_grey.png'">
            </a>
            <a class="row" v-open-win vurl="help" v-row-active.tapmode style="display:none">
                <span>帮助</span>
                <img class="row-arrow" v-src="'../../image/arrow_right_grey.png'">
            </a>
            <a class="row" v-open-win vurl="sys_settings" v-row-active.tapmode>
                <span>系统设置</span>
                <img class="row-arrow" v-src="'../../image/arrow_right_grey.png'">
            </a>
        </div>
    </div>
</body>
<script src="../../script/api.js"></script>
<script src="../../script/vue.js"></script>
<script src="../../script/app.js"></script>
<script src="../../script/common.js"></script>
<script src="../../script/url.js"></script>
<script>
    var infos;
    apiready = function () {
        setBSImg();
        // showProgress();
        new Vue({
            el:'#blank'
        });
        initApp();
        api.parseTapmode();
        addListeners();
    };

    function initApp() {
        new Vue({
            el: '#app',
            data: {
                infos:infos,
                user: getPrefs('user') ? JSON.parse(getPrefs('user')) : {}
            },
            methods:{
                openMyPromotion: function () {
                    if(this.user.level_id) {
                        var url;
                        if(this.user.level_id == '7' || this.user.level_id == '8') {
                            url = 'mypromotion2';
                        }else{
                            url = 'mypromotion'
                        }
                        openWin(url);
                    }else {
                        pinet.alert('请重新登录', reLogin);
                    }
                }
            }
        })
    }

    function addListeners() {
        api.addEventListener({
            name: 'viewappear'
        }, function () {
            onPageStart();
        });

        api.addEventListener({
            name: 'viewdisappear'
        }, function (ret, err) {
            onPageEnd();
        });

        api.addEventListener({
            name: 'keyback'
        }, function (ret, err) {
            onPageEnd();
            api.closeWin();
        });
    }

</script>
</html>
